package com.xltt.vehicleControl.contract;


import com.xltt.vehicleControl.base.BaseView;
import com.xltt.vehicleControl.bean.BaseData;
import com.xltt.vehicleControl.bean.BaseResult;
import com.xltt.vehicleControl.bean.UserResponse;

import java.util.Map;

import io.reactivex.Observable;

/**
 * 用户的接口管理器
 * created by zhanghui
 * on 2020/2/2 15:33
 */
public interface IUserContract {
    interface IUserModel {
        /**
         * 登录
         */
        Observable<BaseResult<UserResponse>> loginByUserAndPassWord(Map<String, String> body);

        /**
         * 登出
         * @return
         */
        Observable<BaseResult<BaseData>> logout();
    }

    interface IUserPresenter {
        void loginByUserAndPassWord(Map<String, String> body);
        void logout();
    }

    interface IUserView extends BaseView {
        /**
         * 登录后用户结果
         */
        void loginResult(BaseResult<UserResponse> user);
        /**
         * 登出后用户结果
         */
        void logoutResult(BaseResult<BaseData> user);
    }
}
